package homework.homework_1;

/**
 * 负责生产电脑的线程
 */
public class Production implements Runnable {
    Computer c;

    public Production(){}

    public Production(Computer c){
        this.c = c;
    }

    @Override
    public void run() {
        while(true){
            try {
                Thread.sleep(1000);
            } catch (InterruptedException e) {
                e.printStackTrace();
            }
            c.production();
        }
    }
}
